<%@page import="com.mysql.fabric.xmlrpc.base.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="leagal_aid.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");
String category = request.getParameter("category");
String picture = request.getParameter("picture");
String content = request.getParameter("data");
String  time= request.getParameter("txtDate");
String  title= request.getParameter("title");
String  link= request.getParameter("link");
String  source= request.getParameter("source");
int homepage = Integer.parseInt(request.getParameter("homepage")); 
String  author= request.getParameter("author");

LeagalBean leagalBean = new LeagalBean();

if(leagalBean.doAdd(category,title,content,picture,time,link,source,homepage,author)){
	
}else{
	response.setCharacterEncoding("utf-8");
	PrintWriter pout = response.getWriter();
	pout.print("<script>alert('错误'); window.location='../addnews.jsp' </script>");
	pout.flush();
	pout.close();
	//response.sendRedirect("login.html");
};
%>    